package org_enum

import "gitee.com/lailonghui/vehicle-supervision-framework/pkg/dicts"

// 组织-工程车企业经营类别状态
type orgEnginVehBusinessTypeStatus int

var OrgEnginVehBusinessTypeStatus orgEnginVehBusinessTypeStatus

// 是
func (c *orgEnginVehBusinessTypeStatus) Yes() int {
	return 1
}

// 否
func (c *orgEnginVehBusinessTypeStatus) No() int {
	return 2
}

// 暂停
func (c *orgEnginVehBusinessTypeStatus) Stop() int {
	return 3
}

func (c *orgEnginVehBusinessTypeStatus) ToText(value int) string {
	switch value {

	case 1:
		return "是"

	case 2:
		return "否"

	case 3:
		return "暂停"

	}
	return ""
}

func (c *orgEnginVehBusinessTypeStatus) ToDict(value int) *dicts.IntDict {
	return &dicts.IntDict{
		Text:  c.ToText(value),
		Value: value,
	}
}

func (c *orgEnginVehBusinessTypeStatus) ToValue(text string) int {
	switch text {

	case "是":
		return 1

	case "否":
		return 2

	case "暂停":
		return 3

	}
	return 0
}
